
PLANNERBASE = resources/planning/

PLANNER_DIR = ${PLANNERBASE}/sgplan

PLANNER = ${PLANNER_DIR}/sgplan

TIMELIMIT = 8	# time limit in seconds

GREP_RULE = "[[:digit:]]\.[[:digit:]]..: ("


################################################################################



DOMAIN_DIR = ${PLANNERBASE}/pddl/domains
PROBLEM_DIR = ${PLANNERBASE}/pddl/problems


CONNECTIONSDOMAIN  = ${DOMAIN_DIR}/connections.pddl
CONNECTIONSPROBLEM = ${PROBLEM_DIR}/connections.pddl


BURGLARDOMAIN  = ${DOMAIN_DIR}/agent.pddl
BURGLARPROBLEM = ${PROBLEM_DIR}/burglar.pddl


POSITIONDOMAIN  = ${DOMAIN_DIR}/position.pddl
POSITIONPROBLEM = ${PROBLEM_DIR}/position.pddl


GUARDDOMAIN  = ${DOMAIN_DIR}/agent.pddl
GUARDPROBLEM = ${PROBLEM_DIR}/guard.pddl


################################################################################


burglar:
	@${PLANNER} -o ${BURGLARDOMAIN} -f ${BURGLARPROBLEM} -cputime ${TIMELIMIT} | grep ${GREP_RULE}

guard:
	@${PLANNER} -o ${BURGLARDOMAIN} -f ${GUARDPROBLEM} -cputime ${TIMELIMIT} | grep ${GREP_RULE}

connections:
	@${PLANNER} -o ${CONNECTIONSDOMAIN} -f ${CONNECTIONSPROBLEM} -cputime ${TIMELIMIT} | grep ${GREP_RULE}


position:
	@${PLANNER} -o ${POSITIONDOMAIN} -f ${POSITIONPROBLEM} | grep ${GREP_RULE}

